<template>
	<b>这个是children3组件</b> <br>
	<b>这个是子组件</b>
	<view >
		{{res}}
	</view>
	<view class=""  style="color: #ff0000;">
		{{data}}
	</view>
	<button @click="setdata">传值给兄弟组件</button>
	<hr>
	<grandchild/>
</template>

<script setup>
	name:'children3'
	import {inject,ref} from 'vue'
	import emitter from '@/plugins'  //文件中有注释
	const res=inject('change')
	let data=ref('children3要传给兄弟children4')
	function setdata(){
		emitter.emit('fn',data)
	}
	
</script>

<style>
</style>